package com.github.thinwonton.showcase.springboot.basic.anno.conditional;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;

@Configuration
class ConditionConfigurer {
    @Bean
    @Conditional(LinuxCondition.class)
    public LinuxCmdService linuxCmdService() {
        return new LinuxCmdService();
    }

    @Bean
    @Conditional(WindowsCondition.class)
    public WindowsCmdService windowsCmdService() {
        return new WindowsCmdService();
    }
}
